/**
 * tzdesk系统平台
 * moonvip_admin
 * com.tz.service.diamondsidecalulation
 * IDiamondSideCalulationService.java
 * 创建人:小胡 
 * 时间：2017年03月04日 14:46:17
 *
 */
package com.tz.service.diamondsidecalulation.impl;

import com.tz.bean.DiamondSideCalulation;
import com.tz.bean.TzParams;
import com.tz.dao.diamondsidecalulation.IDiamondSideCalulationMapper;
import com.tz.service.diamondsidecalulation.IDiamondSideCalulationService;
import com.tz.util.TmStringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * 副石估价管理serviceImpl
 * IDiamondSideCalulationService
 * 创建人:小胡 
 * 时间：2017年03月04日 14:46:17
 * @version 1.0.0
 * 
 */
@Service
public class DiamondSideCalulationServiceImpl implements IDiamondSideCalulationService{

	@Autowired
	private IDiamondSideCalulationMapper diamondsidecalulationMapper;
	
	@Override
	public List<HashMap<String, Object>> findDiamondSideCalulations(TzParams params){
		if(TmStringUtils.isEmpty(params.getOrder()))params.setOrder("create_time desc");
		return diamondsidecalulationMapper.findDiamondSideCalulations(params);
	}
	
	@Override
	public int count(TzParams params) {
		return diamondsidecalulationMapper.count(params);
	}

	@Override
	public HashMap<String ,Object> getDiamondSideCalulation(Integer id) {
		return diamondsidecalulationMapper.getDiamondSideCalulation(id);
	}

	@Override
	public int save(DiamondSideCalulation diamondsidecalulation) {
		return diamondsidecalulationMapper.save(diamondsidecalulation);
	}

	@Override
	public int update(DiamondSideCalulation diamondsidecalulation) {
		return diamondsidecalulationMapper.update(diamondsidecalulation);
	}

	@Override
	public int delete(TzParams params) {
		return diamondsidecalulationMapper.delete(params);
	}

	@Override
	public List<HashMap<String, Object>> getAllquality() {
		return diamondsidecalulationMapper.getAllquality();
	}
}
